package net.liuzd.spring.boot.v2.enums;

public enum OptionEnum {

    LINE("line", "Line - 折线（面积）图"), 
    LINES("lines", "Lines - 线图"), 
    BAR("bar", "Bar - 柱状（条形）图"), 
    SCATTER("scatter","Scatter - 散点（气泡）图"), 
    EFFECTSCATTER("effectScatter", "EffectScatter - 涟漪效果散点图"), 
    CANDLESTICK("candlestick","Candlestick - K线图"), 
    PIE("pie", "Pie - 饼（圆环）图"), 
    GRAPH("graph", "Graph - 关系图,可以实现force"), 
    MAP("map", "Map - 地图"), 
    GAUGE("gauge", "Gauge - 仪表盘"), 
    FUNNEL("funnel "," Funnel - 漏斗图"), 
    TREEMAP("treemap", "Treemap - 矩形树图"), 
    HEATMAP("heatmap","Heatmap - 热力图"), 
    BOXPLOT("boxplot", "Boxplot - 箱形图"), 
    PARALLEL("parallel","Parallel - 平行坐标系"), 
    SANKEY("sankey", "Sankey - 桑基图"),

    ;

    String type;
    String desc;

    OptionEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static OptionEnum get(String type) {
        OptionEnum[] options = OptionEnum.values();
        for (OptionEnum option : options) {
            if (option.getType().equals(type)) {
                return option;
            }
        }
        return null;
    }

}